package com.example.admin.adapter;

import android.graphics.Color;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.example.admin.R;
import com.example.admin.SQLite.User;
import com.example.admin.bean.PersonalBean;
import com.orhanobut.hawk.Hawk;

public class AdminUserdapter extends BaseQuickAdapter<User, BaseViewHolder> {

    public AdminUserdapter() {
        super(R.layout.item_user);
    }

    @Override
    protected void convert(BaseViewHolder helper, User str) {

        helper.setText(R.id.tv0, str.UserAddress);
        helper.setText(R.id.tv4, str.userName);
        if (Hawk.contains("PersonalBean" + str.id)){
            PersonalBean bean= Hawk.get("PersonalBean" + str.id);
            helper.setText(R.id.tv1, bean.ZZ);
            helper.setText(R.id.tv4, bean.name);
            helper.setText(R.id.tv5, bean.phone);
            helper.setText(R.id.tv6, bean.smaill);

        }

    }

}